$(function(){
    
        var idAmostra = $('#idAmostra').val();
   
	//Ativa a grid e seta as propriedades
	jQuery("#gridConsultasolicitacao").jqGrid({
		url:"intranet/consulta/solicitacao/idAmostra/"+idAmostra,//Url da requisacao ajax p/retornar os dados
		datatype: "json", //Tipo de dado retornado pela requisicao
		colNames:['Identifica&ccedil&atildeo', 'Exame','Cliente','Data Cadastro', 'Situa&ccedil;&atilde;o'], 
		colModel:[
   	          //definicao parametros p/os campos da grid
	   		{name:'idSolicitacao',index:'idSolicitacao', width:110,align:"center", sorttype:'int'},
	   		{name:'exame',index:'exame', width:230, align:"center", sorttype:'number', search: false},
	   		{name:'cliente',index:'cliente', width:320, align:"center", sorttype:'number', search: false},
	   		{name:'dataCadastro',index:'dataCadastro', width:150, align:"center", sorttype:'date', formatter:'date', datefmt:'d/m/Y'},
	   		{name:'situacao', index:'situacao', width:130, align:"center", sortable:false, search: false}
	   		  		
	   	],
   		rowNum:20, //qdte de registros listados inicialmente:
   		rowList:[10,20,30],
   		shrinkToFit: false, 
   		heigth: '100%',
   		width: 1000,
   		pager: '#navConsultasolicitacao',
   		sortname: 'idSolicitacao',
   		sortorder: "ASC", //tipo de ordena��o
   		multiselect: false, //creckbox select
   		viewrecords: true,
   		loadonce:true,
   		ignoreCASE:true,
   		caption:"Amostra: "+idAmostra,
   		grouping:false,
		//footerrow: true,
		userdataOnFooter: true
	});
});
jQuery("#gridConsultasolicitacao").jqGrid('navGrid','#gridConsultasolicitacao',{add:false,edit:false,del:false});
jQuery("#gridConsultasolicitacao").jqGrid('filterToolbar',{stringResult:true, searchOnEnter:false});

 

